import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import error from '@dfeidao/atom-web/msgbox/error';
import success from '@dfeidao/atom-web/msgbox/success';
import s_get from '@dfeidao/atom-web/storage/get';
import { IFeidaoAiBrowserComponent } from '@dfeidao/web/interfaces';
import a022 from './a022';

export default async function a007(fd: IFeidaoAiBrowserComponent) {
	// 角色用户删除
	const _id = get(fd, '_id');
	const formgroup_no = get(fd, '_no');
	// const name = get(fd, 'name');


	const productid = await s_get('productid');
	const del_res = await nodejs('functional-permissions/zj-000001/s004', { _id, productid, formgroup_no });
	if (del_res === 'success') {
		success("删除成功");
		await a022(fd);
		fire('zj-000001', 'ec-001');
	} else {
		error("删除失败");

	}
}
